#include <iostream>
#include <vector>
#include <cstring>
using namespace std;


int main()
{
    long long x;
    cin >> x;
    vector<int> nums;
    while(x)
    {
        nums.push_back(x % 10);
        x /= 10;
    }
    int sum = 0;
    for(const auto& num : nums)
        sum += num;
    int n = sum / 2;
    if(n * 2 != sum)
    {
        cout << "NO";
        return 0;
    }
    int dp[20][100];
    memset(dp, -0x3f3f3f3f, sizeof dp);
    int size = nums.size();
    dp[0][0] = 0;
    for(int i = 0; i < size; i++)
    {
        for(int j = 0; j < n; j++)
        {
            dp[i][j] = dp[i - 1][j];
            if(nums[i] > j) continue;
            dp[i][j] = max(dp[i][j], dp[i - 1][j - nums[i]] + nums[i]);
        }
    }
    if(dp[size - 1][n - 1] > 0)
        cout << "YES";
    else
        cout << "NO";
    return 0;
}